package com.huirui.server.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户收货地址表
 *
 * @TableName t_delivery_address
 */
@TableName(value = "t_delivery_address")
@Data
public class DeliveryAddress implements Serializable {
    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 地址ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 用户ID，关联用户表
     */
    @TableField(value = "user_id")
    private Long userId;
    /**
     * 收货人姓名
     */
    @TableField(value = "receiver_name")
    private String receiverName;
    /**
     * 收货人手机号码
     */
    @TableField(value = "receiver_phone")
    private String receiverPhone;
    /**
     * 省份
     */
    @TableField(value = "province")
    private String province;
    /**
     * 城市
     */
    @TableField(value = "city")
    private String city;
    /**
     * 区/县
     */
    @TableField(value = "district")
    private String district;
    /**
     * 详细地址
     */
    @TableField(value = "detail_address")
    private String detailAddress;
    /**
     * 邮政编码
     */
    @TableField(value = "postal_code")
    private String postalCode;
    /**
     * 是否默认地址：0-否，1-是
     */
    @TableField(value = "is_default")
    private Integer isDefault;
    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    private LocalDateTime createdTime;
    /**
     * 更新时间
     */
    @TableField(value = "updated_time")
    private LocalDateTime updatedTime;
}